package io.renren.modules.web.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.modules.web.dao.WebKnowledgeDao;
import io.renren.modules.web.entity.WebKnowledgeEntity;
import io.renren.modules.web.service.WebKnowledgeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Web开发知识服务实现类
 */
@Service
public class WebKnowledgeServiceImpl extends ServiceImpl<WebKnowledgeDao, WebKnowledgeEntity> implements WebKnowledgeService {

    @Autowired
    private WebKnowledgeDao webKnowledgeDao;

    @Override
    public WebKnowledgeEntity getKnowledgeByTypeAndChapter(Integer type, Integer chapterId) {
        return webKnowledgeDao.getKnowledgeByTypeAndChapter(type, chapterId);
    }

    @Override
    public List<WebKnowledgeEntity> getChaptersByType(Integer type) {
        return webKnowledgeDao.getChaptersByType(type);
    }

    @Override
    public List<WebKnowledgeEntity> getAllTypes() {
        return webKnowledgeDao.getAllTypes();
    }
} 